/**
 * Copyright (C), 2020-2020,贵州铭明网络科技有限公司
 * FileName: TestQuartz
 * Author:   杨朝湖
 * Date:     2020/12/21 9:59
 * Description:
 * History:
 * <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
package com.gym.quartz;

import org.quartz.DisallowConcurrentExecution;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.PersistJobDataAfterExecution;
import org.springframework.scheduling.quartz.QuartzJobBean;

/**
 * 〈一句话功能简述〉<br>
 * 〈测试定时任务执行类〉
 *
 * @author Gym
 * @create 2020/12/21
 * @since 1.0.0
 */
@PersistJobDataAfterExecution
@DisallowConcurrentExecution
public class TestQuartz extends QuartzJobBean {
    @Override
    protected void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        String key = jobExecutionContext.getJobDetail().getJobDataMap().getString("key");
        System.out.println("这是参数而已：" + key + ",时间" + System.currentTimeMillis());
    }
}